﻿@using BlogEngine.Core
@{
    var title = Model.Title;
}
<div class="Widget widget pagelist">
    <h4 class="WidgetHeader widget-header">@title</h4>
    <div class="WidgetContent widget-content">
        <ul>
            @foreach (var page in BlogEngine.Core.Page.Pages.OrderBy(page => page.SortOrder).Where(page => page.ShowInList && page.IsVisibleToPublic))
            {
                var href = page.RelativeLink;
                if (BlogSettings.Instance.RemoveExtensionsFromUrls && !string.IsNullOrEmpty(BlogConfig.FileExtension))
                {
                    href = href.Replace(BlogConfig.FileExtension, "");
                }
                <li><a href="@href" title="@page.Description">@page.Title</a></li>
            }
        </ul>
    </div>
</div>